package java07;
import java.io.Serializable;
public class Person implements Serializable {
    //为该类指定一个serialVersionUID变量值
    private static final long serialVersionUID = 1L;
    //声明变量
    private int id;
    private String name;
    private int age;
    //不参与序列化属性
    private transient String y;
    //生成get和set方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
